summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ConcertTest.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ConcertTest.php b/tests/ConcertTest.php
index d81effd..13df320 100644
--- a/tests/ConcertTest.php
+++ b/tests/ConcertTest.php
@@ -198,4 +198,20 @@ final class ConcertTest extends WP_UnitTestCase
$gigs = GiglogAdmin_Concert::find_concerts();
$this->assertEquals(count(self::$concerts), count($gigs));
}
+
+ public function testFetchConcertByNameVenueAndDate() : void
+ {
+ $gigs = GiglogAdmin_Concert::find_concerts([
+ 'name' => 'a concert',
+ 'venue' => 'a venue',
+ 'date' => date('Y-m-d')
+ ]);
+
+ $this->assertEquals(1, count($gigs));
+
+ $gig = array_shift($gigs);
+ $this->assertEquals('a concert', $gig->cname());
+ $this->assertEquals('a venue', $gig->venue()->name());
+ $this->assertEquals(date('Y-m-d'), $gig->cdate());
+ }
}