Esempio n. 1
0
 /**
  * Tests the isEmpty() method.
  */
 public function testIsEmpty()
 {
     $config = new ResizeConfiguration();
     $this->assertTrue($config->isEmpty());
     $config->setMode(ResizeConfiguration::MODE_CROP);
     $this->assertTrue($config->isEmpty());
     $config->setMode(ResizeConfiguration::MODE_PROPORTIONAL);
     $this->assertTrue($config->isEmpty());
     $config->setMode(ResizeConfiguration::MODE_BOX);
     $this->assertTrue($config->isEmpty());
     $config->setWidth(100);
     $this->assertFalse($config->isEmpty());
     $config->setWidth(0)->setHeight(100);
     $this->assertFalse($config->isEmpty());
     $config->setHeight(0)->setZoomLevel(100);
     $this->assertFalse($config->isEmpty());
     $config->setWidth(100)->setHeight(100)->setZoomLevel(100);
     $this->assertFalse($config->isEmpty());
     $config->setWidth(0)->setHeight(0)->setZoomLevel(0);
     $this->assertTrue($config->isEmpty());
 }