summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/BandTest.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/BandTest.php b/tests/BandTest.php
index 764abe3..d3feb51 100644
--- a/tests/BandTest.php
+++ b/tests/BandTest.php
@@ -10,7 +10,7 @@ require __DIR__ . '/../includes/band.php';
final class BandTest extends WP_UnitTestCase
{
- public function testCreatingBandWithName(): void
+ public function testCreatingBandWithName() : void
{
$count = count(GiglogAdmin_Band::all_bands());
@@ -19,4 +19,12 @@ final class BandTest extends WP_UnitTestCase
$this->assertEquals("The Flamboyant Blasphemers", $band->bandname());
$this->assertEquals($count + 1, count(GiglogAdmin_Band::all_bands()));
}
+
+ public function testCreateExistingBand() : void
+ {
+ $band1 = GiglogAdmin_Band::create("The Flamboyant Blasphemers");
+ $band2 = GiglogAdmin_Band::create("The Flamboyant Blasphemers");
+
+ $this->assertEquals($band1->id(), $band2->id());
+ }
}