<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sota1235</author_name>
  <author_url>https://blog.hatena.ne.jp/sota1235/</author_url>
  <blog_title>はらへり日記</blog_title>
  <blog_url>https://sota1235.hatenablog.com/</blog_url>
  <categories>
    <anon>Laravel</anon>
  </categories>
  <description>例外を投げたいマン こんなコードをテストしたいとする。 &lt;?php use Moga; use NyohoException; class Hoge { public function fuga() { try { Moga::send(); return true; } catch (NyohoException $e) { return false; } } } ファサードのメソッドをモック化するにはこう。 Moga::shouldReceive('send'); そしてこのメソッドに例外を投げさせるにはこう。 Moga::shouldReceive('send')-&gt;andThrow(n…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsota1235.hatenablog.com%2Fentry%2F2015%2F10%2F08%2F110505&quot; title=&quot; PHPUnitでファサードモックに例外を投げさせる - はらへり日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-10-08 11:05:05</published>
  <title> PHPUnitでファサードモックに例外を投げさせる</title>
  <type>rich</type>
  <url>https://sota1235.hatenablog.com/entry/2015/10/08/110505</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
