public function addPath($path) { if (!is_string($path)) { throw new Exception\InvalidArgumentException(sprintf('Invalid path provided; must be a string, received %s', gettype($path))); } $this->paths[] = $this->normalizePath($path); }
public function testWillRefuseInvalidPath() { $resolver = new PathStackResolver(); $this->setExpectedException('AssetManager\\Exception\\InvalidArgumentException'); $resolver->addPath(null); }