/** * @test */ public function shouldBeAbleTaChangeNamingStrategy() { $this->configuration->shouldReceive('get')->with('mapping')->andReturn(['type' => 'yaml', 'path' => ['path/to/mapping/files'], "namingStrategy" => ["strategy" => "underscore", "case" => CASE_UPPER]]); $this->configuration->shouldReceive('get')->with('proxy')->andReturn(['path' => 'path/to/proxy/files']); $this->configuration->shouldReceive('get')->with('onProduction')->andReturn(true); $configuredDriver = $this->driver->configureDriver(); $this->assertInstanceOf('Doctrine\\ORM\\Mapping\\UnderscoreNamingStrategy', $configuredDriver->getNamingStrategy()); $this->assertEquals(CASE_UPPER, $configuredDriver->getNamingStrategy()->getCase()); }
/** * @test */ public function shouldConfigureXcacheCache() { $this->configuration->shouldReceive('get')->with('cache')->andReturn(['type' => 'Xcache']); $configuredCache = $this->cache->configureCache(); $this->assertInstanceOf('Doctrine\\Common\\Cache\\XcacheCache', $configuredCache); }