mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 14:33:14 +00:00
V 3.5 RC 1
This commit is contained in:
48
lib/unitTest/Setup/Setup_ConstraintTest.php
Normal file
48
lib/unitTest/Setup/Setup_ConstraintTest.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
require_once dirname(__FILE__) . '/../PhraseanetPHPUnitAbstract.class.inc';
|
||||
|
||||
/**
|
||||
* Test class for Setup_Constraint.
|
||||
* Generated by PHPUnit on 2011-10-27 at 18:08:06.
|
||||
*/
|
||||
class Setup_ConstraintTest extends PhraseanetPHPUnitAbstract
|
||||
{
|
||||
|
||||
protected $object_non_blocker;
|
||||
protected $object_blocker;
|
||||
protected $message = "&é'(§è!çà dfljk sdq'";
|
||||
protected $name = "Un joli nom";
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->object_non_blocker = new Setup_Constraint($this->name, true, $this->message, false);
|
||||
$this->object_blocker = new Setup_Constraint($this->name, false, $this->message, true);
|
||||
}
|
||||
|
||||
public function testGet_name()
|
||||
{
|
||||
$this->assertEquals($this->name, $this->object_blocker->get_name());
|
||||
$this->assertEquals($this->name, $this->object_non_blocker->get_name());
|
||||
}
|
||||
|
||||
public function testIs_ok()
|
||||
{
|
||||
$this->assertFalse($this->object_blocker->is_ok());
|
||||
$this->assertTrue($this->object_non_blocker->is_ok());
|
||||
}
|
||||
|
||||
public function testIs_blocker()
|
||||
{
|
||||
$this->assertTrue($this->object_blocker->is_blocker());
|
||||
$this->assertFalse($this->object_non_blocker->is_blocker());
|
||||
}
|
||||
|
||||
public function testGet_message()
|
||||
{
|
||||
$this->assertEquals($this->message, $this->object_blocker->get_message());
|
||||
$this->assertEquals($this->message, $this->object_non_blocker->get_message());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user