assertEmpty() public method

public assertEmpty ( $v )
Exemplo n.º 1
0
 protected function doDelete(RecordInterface $record, Version $version)
 {
     $this->testCase->assertEquals(8, $this->pathParameters->getProperty('fooId'));
     $this->testCase->assertEmpty($this->pathParameters->getProperty('bar'));
     $this->testCase->assertEquals(1, $record->getId());
     return array('success' => true, 'message' => 'You have successful delete a record');
 }
Exemplo n.º 2
0
 /**
  * Calls assertEmpty() or assertThat() depending on the PHPUnit version.
  * Available from PHPUnit >= 3.5
  *
  * @param mixed $actual Actual value
  * @param string $message Message to print if assertion is wrong
  */
 public static function assertEmpty($actual, $message = '')
 {
     if (self::_checkMethod('assertEmpty')) {
         parent::assertEmpty($actual, $message);
     } else {
         parent::assertThat($actual, parent::isEmpty(), $message);
     }
 }
Exemplo n.º 3
0
  	/**
  	 * Provide assertEmpty() in PHPUnit <3.5.
  	 * We want to support PHPUnit 3.4, as this is the most recent release available
  	 * to environments running PHP <=5.2.6, such as Debian Lenny.
  	 */
	public static function assertEmpty($item, $message = '') {
		if(class_exists('PHPUnit_Framework_Constraint_IsEmpty')) {
			parent::assertEmpty($item, $message);
		} else {
			if(!empty($item)) {
				$message = $message ? $message : "Failed asserting that " . var_export($item, true) . " is empty.";
				throw new PHPUnit_Framework_AssertionFailedError($message);
			}
		}
	}
Exemplo n.º 4
0
 /**
  * @test
  */
 public function emptyProcessors()
 {
     $processors = $this->processorContainer->getProcessors();
     parent::assertInstanceOf(\Traversable::class, $processors);
     parent::assertEmpty($processors);
 }
Exemplo n.º 5
0
 /**
  * @test
  */
 public function emptyHandlers()
 {
     $handlers = $this->handlerContainer->getHandlers();
     parent::assertInstanceOf(\Traversable::class, $handlers);
     parent::assertEmpty($handlers);
 }