Exemplo n.º 1
0
 /**
  * @expectedException \Sp\BowerBundle\Bower\Exception\FileNotFoundException
  */
 public function testMapThrowsFileNotFoundException()
 {
     $configDir = self::$fixturesDirectory . "/config";
     $config = new Configuration($configDir);
     $arrayDependencyMapping = (require self::$fixturesDirectory . '/invalid_dependency_mapping.php');
     $this->dependencyMapper->map($arrayDependencyMapping, $config);
 }
Exemplo n.º 2
0
 protected function setUp()
 {
     $this->bower = $this->getMockBuilder('Sp\\BowerBundle\\Bower\\Bower')->disableOriginalConstructor()->getMock();
     $this->bowerManager = $this->getMockBuilder('Sp\\BowerBundle\\Bower\\BowerManager')->disableOriginalConstructor()->getMock();
     $this->bowerResource = new BowerResource($this->bower, $this->bowerManager, new PackageNamingStrategy());
     $configDir = self::$fixturesDirectory . "/config";
     $config = new Configuration($configDir);
     $bundles = array('DemoBundle' => $config);
     $arrayDependencyMapping = (require self::$fixturesDirectory . '/dependency_mapping.php');
     $mapper = new DependencyMapper();
     $mapping = $mapper->map($arrayDependencyMapping, $config);
     $this->bowerManager->expects($this->once())->method('getBundles')->will($this->returnValue($bundles));
     $this->bower->expects($this->once())->method('getDependencyMapping')->with($this->equalTo($config))->will($this->returnValue($mapping));
 }