Skip to content

Commit fc0173c

Browse files
devinfdbarryvdh
authored andcommitted
added assertFileNameIs (barryvdh#329)
1 parent 9993020 commit fc0173c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/PdfFaker.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
class PdfFaker extends PdfWrapper
77
{
88
protected $view;
9+
protected $filename;
910

1011
/**
1112
* Load a View and convert to HTML
@@ -154,6 +155,19 @@ public function assertDontSeeText($value)
154155

155156
return $this;
156157
}
158+
159+
/**
160+
* Assert that the given string is equal to the saved filename.
161+
*
162+
* @param string $value
163+
* @return $this
164+
*/
165+
public function assertFileNameIs($value)
166+
{
167+
PHPUnit::assertEquals($value, $this->filename);
168+
169+
return $this;
170+
}
157171

158172
public function output()
159173
{
@@ -275,6 +289,7 @@ public function output()
275289
*/
276290
public function save($filename, $overwrite = false)
277291
{
292+
$this->filename = $filename;
278293
return $this;
279294
}
280295
}

0 commit comments

Comments
 (0)