Skip to content

Instantly share code, notes, and snippets.

@memememomo
Created May 11, 2015 07:08
Show Gist options
  • Save memememomo/f3ae6fd253ab339ce0b9 to your computer and use it in GitHub Desktop.
Save memememomo/f3ae6fd253ab339ce0b9 to your computer and use it in GitHub Desktop.
コントローラのユニットテストでHTMLを描画しようとするとAssetファイルが正常の読み込まれない ref: http://qiita.com/uchiko/items/2461783d60441012423b
<?php
return array(
'paths' => [DOCROOT.'public/assets/']
);
public function test_index()
{
$request = \Fuel\Core\Request::forge('/');
$response = $request->execute()->response();
// この行のrender()メソッドでエラーが出る。
$html = $response->body()->render();
$pattern = '/' . preg_quote('トップページ', '/') . '/u';
$this->assertRegExp($pattern, $body);
}
Fuel\Core\FuelException: Could not find asset: bootstrap.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment