66use Doctrine \ORM \Tools \SchemaTool ;
77use Doctrine \ORM \Tools \Setup ;
88use Symfony \Component \Console \Input \ArrayInput ;
9+ use Symfony \Component \Console \Output \BufferedOutput ;
910use Symfony \Component \Console \Output \NullOutput ;
1011use Tapestry \Console \DefaultInputDefinition ;
1112use Tapestry \Entities \Configuration ;
@@ -69,17 +70,20 @@ public static function runTapestry($siteDir = __DIR__ . DIRECTORY_SEPARATOR . 'm
6970 '--env ' => 'testing '
7071 ], $ definitions ));
7172
72- $ tapestry ->setOutput (new NullOutput ());
73+
74+ $ bufferedOutput = new BufferedOutput ();
75+
76+ $ tapestry ->setOutput ($ bufferedOutput );
7377
7478 /** @var array $steps */
7579 $ steps = $ tapestry ->getContainer ()->get ('Compile.Steps ' );
7680 $ generator = new Generator ($ steps , $ tapestry );
7781
7882 /** @var Project $project */
7983 $ project = $ tapestry ->getContainer ()->get (Project::class);
80- $ generator ->generate ($ project , new NullOutput () );
84+ $ generator ->generate ($ project , $ bufferedOutput );
8185
82- return $ tapestry ;
86+ return $ bufferedOutput ;
8387 }
8488
8589 /**
@@ -89,7 +93,9 @@ public function testNoChangeRunThrough()
8993 {
9094 $ loops = 0 ;
9195 while ($ loops < 2 ) {
92- self ::runTapestry ();
96+ $ output = self ::runTapestry ();
97+ $ this ->assertContains ('[$] Syncing with database. ' , $ output ->fetch ());
98+
9399 $ contentTypes = self ::$ em ->getRepository (ContentType::class)->findAll ();
94100 $ this ->assertCount (2 , $ contentTypes );
95101
0 commit comments