public function testWriteAssetIfNotExists()
{
$this->configuration->setBuildOnRequest(true);
$this->configuration->setWriteIfChanged(true);
$this->object->build();
$manager = $this->object->getAssetManager();
$factory = $this->object->createAssetFactory($this->configuration->getModule('test_application'));
$asset = $manager->get('base_css');
$targetFile = $this->configuration->getWebPath($asset->getTargetPath());
if (is_file($targetFile)) {
unlink($targetFile);
}
$this->assertFileNotExists($targetFile);
$this->object->writeAsset($asset, $factory);
$this->assertFileExists($targetFile);
}