public function testAddReCaptchaScript() { $this->View->expects($this->at(0))->method('append')->with('script', $this->stringContains('https://www.google.com/recaptcha/api.js')); $this->User->addReCaptchaScript(); }