From f2b63c7e20118bfaefe8629f61d45a08e771f852 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 21 Apr 2021 20:45:52 +0200 Subject: Fix Bands class constructor. The expected attributes did not have names corresponding with the table columns, which meant that creating a band directly from a returned table row did not produce the expected result. --- tests/BandTest.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/BandTest.php b/tests/BandTest.php index 33b14f4..e4fccbe 100644 --- a/tests/BandTest.php +++ b/tests/BandTest.php @@ -39,6 +39,7 @@ final class BandTest extends WP_UnitTestCase $this->assertEquals($count, count(GiglogAdmin_Band::all_bands())); $this->assertEquals($existing_band->id(), $new_band->id()); + $this->assertEquals($existing_band->bandname(), $new_band->bandname()); } public function testCreateBandsWithSameNameInDifferentCountry() : void @@ -54,6 +55,7 @@ final class BandTest extends WP_UnitTestCase $found = GiglogAdmin_Band::find("The Flamboyant Blasphemers", "NO"); $this->assertNotNull($found); + $this->assertEquals("The Flamboyant Blasphemers", $found->bandname()); } public function testFindNonExistingBandReturnsNULL() : void -- cgit v1.2.3