Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Jan 8, 2020
1 parent 5cb19f3 commit d9b1507
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/TestCase/Utility/MimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ public function testWrongFileExtension() {
* @return void
*/
public function testgetMimeTypeByAlias() {
$res = $this->Mime->detectMimeType('http://www.spiegel.de/static/sys/v10/icons/home_v2.png');
$res = $this->Mime->detectMimeType('https://raw.githubusercontent.com/dereuromark/cakephp-ide-helper/master/docs/img/code_completion.png');
$this->assertEquals('image/png', $res);

$res = $this->Mime->detectMimeType('http://www.spiegel.de/static/sys/v10/icons/home_v2_inexistent.png');
$res = $this->Mime->detectMimeType('https://raw.githubusercontent.com/dereuromark/cakephp-ide-helper/master/docs/img/code_completion_invalid.png');
$this->assertEquals('', $res);

$res = $this->Mime->detectMimeType(Plugin::path('Tools') . 'tests' . DS . 'test_files' . DS . 'img' . DS . 'hotel.jpg');
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Utility/UtilityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,13 @@ public function testGetClientIp() {
* @return void
*/
public function testFileExists() {
$res = Utility::fileExists('http://www.spiegel.de/static/sys/v10/icons/home_v2.png');
$res = Utility::fileExists('https://raw.githubusercontent.com/dereuromark/cakephp-tools/master/docs/README.md');
$this->assertTrue($res);

$res = Utility::fileExists(Plugin::path('Tools') . 'tests' . DS . 'test_files' . DS . 'img' . DS . 'hotel.jpg');
$this->assertTrue($res);

$res = Utility::fileExists('http://www.spiegel.de/static/sys/v10/icons/home_v2_inexistent.png');
$res = Utility::fileExists('https://raw.githubusercontent.com/dereuromark/cakephp-tools/master/docs/README_invalid.md');
$this->assertFalse($res);

$res = Utility::fileExists(Plugin::path('Tools') . 'tests' . DS . 'test_files' . DS . 'img' . DS . 'fooooo.jpg');
Expand Down

0 comments on commit d9b1507

Please sign in to comment.