/** * @covers DataSift\Storyplayer\Prose\AssertsObject::__construct */ public function testCanInstantiate() { // ---------------------------------------------------------------- // setup your test $i = new Injectables(); $i->initOutputSupport(); $i->initRuntimeConfigSupport($i); $st = new StoryTeller($i); $expectedArray = array(new stdClass()); // ---------------------------------------------------------------- // perform the change $obj = new AssertsObject($st, $expectedArray); // ---------------------------------------------------------------- // test the results $this->assertTrue($obj instanceof AssertsObject); }
/** * @covers DataSift\Storyplayer\CommandLib\SshClient::convertParamsForUse */ public function testCanEscapeParamsForRemoteGlobbing() { // ---------------------------------------------------------------- // setup your test $i = new Injectables(); $i->initOutputSupport(); $i->initDataFormatterSupport(); $i->initRuntimeConfigSupport($i); $st = new StoryTeller($i); $obj = new SshClient($st); $inputParams = "ls *"; $expectedParams = "ls '*'"; // ---------------------------------------------------------------- // perform the change $actualParams = $obj->convertParamsForUse($inputParams); // ---------------------------------------------------------------- // test the results $this->assertEquals($expectedParams, $actualParams); }