Skip to content

Commit

Permalink
formatting and rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Dec 19, 2019
1 parent 9c90e2a commit 1d5bc20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ public function storeConsoleLog($name)
* @param string $name
* @return $this
*/
public function source($name)
public function storeSource($name)
{
$source = $this->driver->getPageSource();

Expand Down
4 changes: 2 additions & 2 deletions tests/BrowserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ public function test_can_enable_fit_on_failure()
$this->assertTrue($this->browser->fitOnFailure);
}

public function test_source()
public function test_source_code_can_be_stored()
{
$this->driver->shouldReceive('getPageSource')->andReturn('source content');
Browser::$storeSourceAt = sys_get_temp_dir();
$this->browser->source(
$this->browser->storeSource(
$name = 'screenshot-01'
);
$this->assertFileExists(Browser::$storeSourceAt.'/'.$name.'.txt');
Expand Down

0 comments on commit 1d5bc20

Please sign in to comment.