Ejemplo n.º 1
0
 public function testFind()
 {
     $colorModel = new Color($this->container);
     $this->assertEquals('yellow', $colorModel->find('yellow'));
     $this->assertEquals('yellow', $colorModel->find('Yellow'));
     $this->assertEquals('dark_grey', $colorModel->find('Dark Grey'));
     $this->assertEquals('dark_grey', $colorModel->find('dark_grey'));
 }
Ejemplo n.º 2
0
 /**
  * Apply filter
  *
  * @access public
  * @return FilterInterface
  */
 public function apply()
 {
     $this->query->eq(Task::TABLE . '.color_id', $this->colorModel->find($this->value));
     return $this;
 }