コード例 #1
0
 public function testNoTestsDoesNotIncludeYepnope()
 {
     Yepnope::eval_yepnope();
     $scripts = Requirements::get_custom_scripts();
     $javascripts = Requirements::backend()->get_javascript();
     $this->assertEquals('', $scripts, 'YepNope output found, even though no test were added');
     $this->assertEquals(array(), $javascripts, 'YepNope lib was included, even though no tests were added');
 }
コード例 #2
0
 /**
  * Controller hook for evaluating Yepnope conditions after init() has been called
  * 
  * @return void
  */
 public function onAfterInit()
 {
     if (Yepnope::get_automatically_evaluate()) {
         Yepnope::eval_yepnope();
     }
 }