Exemplo n.º 1
0
 /**
  * Check & validate the featured parameter
  * @param  Task $task Download task
  * @param  bool $option Option value
  */
 public function featuredParameter(Task $task, $option)
 {
     $task->setFeatured($option);
     if ($option === true) {
         $this->verboseOutput('Download only featured photos.');
     }
     $this->verboseOutput('Download featured and not featured photos.');
 }
Exemplo n.º 2
0
 /**
  * Test Simondubois\UnsplashDownloader\Task::getFeatured()
  *     & Simondubois\UnsplashDownloader\Task::setFeatured()
  */
 public function testFeatured()
 {
     // Instantiate task & custom value
     $task = new Task();
     $featured = true;
     // Assert default value
     $this->assertNull($task->getFeatured());
     // Assert custom value
     $task->setFeatured($featured);
     $this->assertEquals($featured, $task->getFeatured());
 }