testThatValidMeetingsCanBeInstantiated() { 3. $this->assertInstanceOf(Meeting::class, 4. new Meeting( 5. Uuid::uuid4(), 6. 'This is a test', 7. 'This is a test description', 8. 'M01', 9. new MeetingDuration( 10. new DateTimeImmutable('2018-02-20 19:00'), 11. new DateTimeImmutable('2018-02-20 22:00') 12. ), 13. false, 14. 'This is a test sub title', 15. new Program([]) 16. ) 17. ); 18. } 19. } $ vendor/bin/phpunit -c phpunit.xml.dist tests/ PHPUnit 5.7.27 by Sebastian Bergmann and contributors. ........ 8 / 8 (100%) Time: 25 ms, Memory: 4.00MB OK (8 tests, 8 assertions)
testThatValidMeetingsCanBeInstantiated() { 3. $this->assertInstanceOf(Meeting::class, 4. new Meeting( 5. Uuid::uuid4(), 6. new MeetingPresentation( 7. 'This is a test', 8. 'This is a test description', 9. 'This is a test sub title' 10. ), 11. 'M01', 12. new MeetingDuration( 13. new DateTimeImmutable('2018-02-20 19:00'), 14. new DateTimeImmutable('2018-02-20 22:00') 15. ), 16. false, 17. 'This is a test sub title', 18. new Program([]) 19. ) 20. ); 21. } 22. } OK (8 tests, 8 assertions)
getPrivatelyAvailableTickets or getPubliclyAvailableTickets */ 4. public function getAvailableTickets(Meeting $meeting, bool $publicOnly, User $user, 5. bool $forReserve): array {...} 6. 7. public function getPrivatelyAvailableTickets(Meeting $meeting): array {...} 8. 9. public function getPubliclyAvailableTickets(Meeting $meeting, User $user, 10. bool $forReserve): array {...} 11. 12. ... 13. }
getTicketsUserCanReserve or getTicketsUserCanPurchase */ 3. public function getAvailableTickets(Meeting $meeting, bool $publicOnly, User $user, 4. bool $forReserve): array {...} 5. 6. public function getPrivatelyAvailableTickets(Meeting $meeting): array {...} 7. 8. /** @deprecated Use getTicketsUserCanReserve or getTicketsUserCanPurchase */ 9. public function getPubliclyAvailableTickets(Meeting $meeting, User $user, bool $forReserve): array {...} 10. 11. public function getTicketsUserCanReserve(Meeting $meeting, User $user): array {...} 12. 13. private function getTicketsUserCanPurchase(Meeting $meeting, User $user): array {...} 14. 15. private function thereAreTicketsLeftForSale(Ticket $ticket, array $currentSoldPerTicket): bool {...} 16. }