/** * Setting up the stage before our unit tests run. */ protected function setUp() { StreamWrapper::setStreamOverrides(array()); $class = new ReflectionClass('Respect\\Test\\StreamWrapper'); $props = $class->getStaticProperties(); $this->object = $props['wrapper']; $this->class = new ReflectionClass(get_class($this->object)); }
/** * @covers Respect\Test\StreamWrapper::interfacePrep */ public function testInterfacePrep() { $sw = new StreamWrapper(); Reflect::on($sw)->setProperty('methods', array()); StreamWrapper::setStreamOverrides(array()); $stat = $sw->url_stat('.', STREAM_URL_STAT_LINK); $this->assertEquals('-1', $stat['blocks']); }
protected function setUp() { if (!in_array($this->getName(), array('testLoadFile', 'testLoadFileMultiple'))) { return; } $ini = <<<INI foo = bar baz = bat INI; $pnd = <<<PND happy = panda panda = happy PND; StreamWrapper::setStreamOverrides(array('exists.ini' => $ini, 'multiple/foo-bar-baz.ini' => $ini, 'multiple/happy-panda.ini' => $pnd)); }
/** * Setting up the stage before our unit tests run. */ protected function setUp() { StreamWrapper::setStreamOverrides(array()); $this->object = new StreamWrapper(); }