Skip to content

Commit

Permalink
Use is_file instead of file_exists
Browse files Browse the repository at this point in the history
Use is_file instead of file_exists

Because is_file will return true if the path is a directory. file_exists() will return true
  • Loading branch information
jeroendesloovere committed May 7, 2018
1 parent da3897f commit eb2c1ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/Utility/ThumbnailsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ public function testClassMethods()

// Test thumbnail deleting
$this->thumbnails->delete($this->rootPath, $this->filename);
$this->assertFalse(file_exists($this->rootPath . '/' . self::LANDSCAPE . '/' . $this->filename));
$this->assertFalse(file_exists($this->rootPath . '/' . self::PORTRAIT . '/' . $this->filename));
$this->assertFalse(file_exists($this->rootPath . '/' . self::SQUARE . '/' . $this->filename));
$this->assertTrue(file_exists($this->rootPath . '/' . self::SOURCE . '/' . $this->filename));
$this->assertFalse(is_file($this->rootPath . '/' . self::LANDSCAPE . '/' . $this->filename));
$this->assertFalse(is_file($this->rootPath . '/' . self::PORTRAIT . '/' . $this->filename));
$this->assertFalse(is_file($this->rootPath . '/' . self::SQUARE . '/' . $this->filename));
$this->assertTrue(is_file($this->rootPath . '/' . self::SOURCE . '/' . $this->filename));
}
}

0 comments on commit eb2c1ae

Please sign in to comment.