public function testRemoveAll() { $this->map->set('foo', 'bar', 'value1'); $this->map->set('foo', 'baz', 'value2'); $this->map->set('foo', 'bam', 'value3'); $this->map->set('bar', 'boo', 'value4'); $this->map->removeAll('foo'); $this->assertFalse($this->map->contains('foo')); $this->assertFalse($this->map->contains('foo', 'bar')); $this->assertFalse($this->map->contains('foo', 'baz')); $this->assertFalse($this->map->contains('foo', 'bam')); $this->setExpectedException('\\OutOfBoundsException'); $this->map->listByPrimaryKey('foo'); }
/** * Returns whether a type descriptor was set for the given name/package. * * @param string $typeName The name of the type. * @param string $packageName The name of the package containing the type. * * @return bool Returns `true` if a type descriptor was set for the given * name/package. */ public function contains($typeName, $packageName = null) { return $this->map->contains($typeName, $packageName); }
/** * Returns whether a path mapping was set for the given repository * path/module. * * @param string $repositoryPath The repository path of the mapping. * @param string|null $moduleName The module containing the mapping. * * @return bool Returns `true` if a path mapping was set for the given * repository path/module. */ public function contains($repositoryPath, $moduleName = null) { return $this->map->contains($repositoryPath, $moduleName); }