public function testInvalidDirectory() { $resource = new DirectoryResource(__DIR__ . 'foo'); $this ->assertEquals(0, iterator_count($resource), 'works for non-existent directory'); }