Exemplo n.º 1
0
 public function testGetIterator3()
 {
     $gfw = $this->getMockBuilder('Nethgui\\Utility\\PhpWrapper')->disableOriginalConstructor()->setMethods(array('scandir'))->getMock();
     $gfw->expects($this->any())->method('scandir')->will($this->returnValue(FALSE));
     $di = $this->getMockBuilder('Nethgui\\Component\\DependencyInjector')->getMock();
     $object = new \Nethgui\Module\ModuleLoader($di);
     $object->setPhpWrapper($gfw);
     try {
         $object->getIterator();
     } catch (\Exception $ex) {
         $this->assertInstanceOf('UnexpectedValueException', $ex);
         $this->assertEquals(1322649822, $ex->getCode());
     }
 }