Files
Phraseanet/tests/Alchemy/Tests/Phrasea/Setup/Probe/ProbeTestCase.php
2013-12-10 01:29:02 +01:00

48 lines
1.4 KiB
PHP

<?php
namespace Alchemy\Tests\Phrasea\Setup\Probe;
abstract class ProbeTestCase extends \PhraseanetTestCase
{
abstract protected function getClassName();
private function getProbe()
{
$classname = $this->getClassName();
return $classname::create(self::$DI['app']);
}
public function testIsInstance()
{
$this->assertInstanceOf('Alchemy\Phrasea\Setup\Probe\ProbeInterface', $this->getProbe());
}
public function testGetRecommendations()
{
$this->assertInternalType('array', $this->getProbe()->getRecommendations());
foreach ($this->getProbe()->getRecommendations() as $recommandation) {
$this->assertInstanceOf('Alchemy\Phrasea\Setup\RequirementInterface', $recommandation);
}
}
public function testGetRequirements()
{
$this->assertInternalType('array', $this->getProbe()->getRequirements());
foreach ($this->getProbe()->getRequirements() as $requirement) {
$this->assertInstanceOf('Alchemy\Phrasea\Setup\RequirementInterface', $requirement);
}
}
public function testGetInformations()
{
$this->assertInternalType('array', $this->getProbe()->getInformations());
foreach ($this->getProbe()->getInformations() as $information) {
$this->assertInstanceOf('Alchemy\Phrasea\Setup\InformationInterface', $information);
}
}
}