annotate vendor/consolidation/output-formatters/test.php @ 5:12f9dff5fda9
tip
Update to Drupal core 8.7.1
author |
Chris Cannam |
date |
Thu, 09 May 2019 15:34:47 +0100 |
parents |
c75dbcec494b |
children |
|
rev |
line source |
Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 use Consolidation\OutputFormatters\Transformations\WordWrapper;
|
Chris@0
|
4
|
Chris@0
|
5 include 'vendor/autoload.php';
|
Chris@0
|
6
|
Chris@0
|
7 $wrapper = new WordWrapper(78);
|
Chris@0
|
8
|
Chris@0
|
9 $data = [
|
Chris@0
|
10 'name' => ['Name', ':', 'Rex', ],
|
Chris@0
|
11 'species' => ['Species', ':', 'dog', ],
|
Chris@0
|
12 'food' => ['Food', ':', 'kibble', ],
|
Chris@0
|
13 'legs' => ['Legs', ':', '4', ],
|
Chris@0
|
14 'description' => ['Description', ':', 'Rex is a very good dog, Brett. He likes kibble, and has four legs.', ],
|
Chris@0
|
15 ];
|
Chris@0
|
16
|
Chris@0
|
17 $result = $wrapper->wrap($data);
|
Chris@0
|
18
|
Chris@0
|
19 var_export($result);
|
Chris@0
|
20
|