From 5b1116313ab07ecbb94a5098695af8f6b54cfac5 Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Tue, 11 Oct 2016 13:09:36 -0700 Subject: [PATCH] Use ob_start and ob_get_clean --- logging/api/test/ListEntriesCommandTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/logging/api/test/ListEntriesCommandTest.php b/logging/api/test/ListEntriesCommandTest.php index 2d46e4aca0..54a01f9177 100644 --- a/logging/api/test/ListEntriesCommandTest.php +++ b/logging/api/test/ListEntriesCommandTest.php @@ -70,6 +70,7 @@ public function testListEntries() $application->add(new ListEntriesCommand()); $commandTester = new CommandTester($application->get('list-entries')); $this->runEventuallyConsistentTest(function() use ($commandTester) { + ob_start(); $commandTester->execute( [ '--project' => $this->projectId, @@ -77,7 +78,8 @@ public function testListEntries() ], ['interactive' => false] ); - $this->expectOutputRegex('/: Test Message/'); + $output = ob_get_clean(); + $this->assertRegexp('/: Test Message/', $output); }); } }