Skip to content

Commit e535782

Browse files
committed
test setup 1
1 parent f5d7cb3 commit e535782

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

tests/WeatherbitTests.php renamed to tests/WeatherbitTest.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use PHPUnit\Framework\TestCase;
88
use Attogram\Filesystem\Cache;
99

10-
final class WeatherbitTests extends TestCase
10+
final class WeatherbitTest extends TestCase
1111
{
1212
/**
1313
* @var Attogram\Weatherbit\Weatherbit
@@ -26,4 +26,18 @@ public function testClass()
2626
$this->setWeatherbit();
2727
$this->assertInstanceOf(Weatherbit::class, $this->weatherbit);
2828
}
29+
30+
public function testSetKeyEmpty()
31+
{
32+
$this->setWeatherbit();
33+
$this->expectException(Exception::class);
34+
$this->weatherbit->setKey('');
35+
}
36+
37+
public function testSetKeyNotString()
38+
{
39+
$this->setWeatherbit();
40+
$this->expectException(Exception::class);
41+
$this->weatherbit->setKey([]]);
42+
}
2943
}

0 commit comments

Comments
 (0)