public function testExecute() { $instance = new Help(''); $session = new \Pry\Session(__FILE__); ob_start(); $status = $instance->execute($session); $actual = ob_get_contents(); ob_end_clean(); $this->assertTrue($status); $expected = implode(PHP_EOL, [' clear Clears the screen (Ctrl-L) ', ' help Displays command help ', ' show-classes Displays all declared classes ', ' show-constants Displays all defined constants ', ' show-functions Displays all user defined functions ', ' show-vars Displays all defined variables ', ' quit Quits pry (Ctrl-D) ', ' trace Displays the call stack trace ', ' whereami Displays the inspected code ', '']); $this->assertEquals($expected, $actual); }