@@ -842,126 +842,4 @@ public function getRegistrationTaxRateReturnsPriceOptionTaxRateIfSet(): void
842842
843843 self ::assertEquals (7.00 , $ result );
844844 }
845-
846- #[Test]
847- public function getRegistrationTotalPriceReturnsCorrectPriceForSingleRegistration (): void
848- {
849- $ this ->importCSVDataSet (__DIR__ . '/../Fixtures/registration_price_calculations.csv ' );
850-
851- /** @var Registration $registration */
852- $ registration = $ this ->registrationRepository ->findByUid (4 );
853-
854- $ result = $ this ->subject ->getRegistrationTotalPrice ($ registration );
855- self ::assertEquals (25.50 , $ result );
856- }
857-
858- #[Test]
859- public function getRegistrationTotalPriceReturnsCorrectPriceForMultipleRegistrations (): void
860- {
861- $ this ->importCSVDataSet (__DIR__ . '/../Fixtures/registration_price_calculations.csv ' );
862-
863- /** @var Registration $registration */
864- $ registration = $ this ->registrationRepository ->findByUid (1 );
865-
866- $ result = $ this ->subject ->getRegistrationTotalPrice ($ registration );
867- self ::assertEquals (30.00 , $ result );
868- }
869-
870- #[Test]
871- public function getRegistrationTotalPriceReturnsCorrectPriceWithPriceOptions (): void
872- {
873- $ this ->importCSVDataSet (__DIR__ . '/../Fixtures/registration_price_calculations.csv ' );
874-
875- /** @var Registration $registration */
876- $ registration = $ this ->registrationRepository ->findByUid (5 );
877-
878- $ result = $ this ->subject ->getRegistrationTotalPrice ($ registration );
879- self ::assertEquals (35.00 , $ result );
880- }
881-
882- #[Test]
883- public function getMainAndChildRegistrationsReturnsOnlyMainRegistrationForSingleRegistration (): void
884- {
885- $ this ->importCSVDataSet (__DIR__ . '/../Fixtures/registration_price_calculations.csv ' );
886-
887- /** @var Registration $registration */
888- $ registration = $ this ->registrationRepository ->findByUid (4 );
889-
890- $ result = $ this ->subject ->getMainAndChildRegistrations ($ registration );
891- self ::assertCount (1 , $ result );
892- self ::assertEquals (4 , $ result [0 ]->getUid ());
893- }
894-
895- #[Test]
896- public function getMainAndChildRegistrationsReturnsMainAndChildRegistrations (): void
897- {
898- $ this ->importCSVDataSet (__DIR__ . '/../Fixtures/registration_price_calculations.csv ' );
899-
900- /** @var Registration $registration */
901- $ registration = $ this ->registrationRepository ->findByUid (1 );
902-
903- $ result = $ this ->subject ->getMainAndChildRegistrations ($ registration );
904- self ::assertCount (3 , $ result );
905- self ::assertEquals (1 , $ result [0 ]->getUid ());
906- self ::assertEquals (2 , $ result [1 ]->getUid ());
907- self ::assertEquals (3 , $ result [2 ]->getUid ());
908- }
909-
910- #[Test]
911- public function evaluateRegistrationPriceReturnsEventPriceIfNoPriceOption (): void
912- {
913- $ this ->importCSVDataSet (__DIR__ . '/../Fixtures/registration_price_calculations.csv ' );
914-
915- /** @var Registration $registration */
916- $ registration = $ this ->registrationRepository ->findByUid (4 );
917- $ event = $ registration ->getEvent ();
918-
919- $ serverRequest = new ServerRequest ();
920- $ result = $ this ->subject ->evaluateRegistrationPrice ($ event , $ registration , $ serverRequest );
921-
922- self ::assertEquals (25.50 , $ result );
923- }
924-
925- #[Test]
926- public function evaluateRegistrationPriceReturnsPriceOptionPriceIfSet (): void
927- {
928- $ this ->importCSVDataSet (__DIR__ . '/../Fixtures/registration_price_calculations.csv ' );
929-
930- /** @var Registration $registration */
931- $ registration = $ this ->registrationRepository ->findByUid (5 );
932- $ event = $ registration ->getEvent ();
933-
934- $ serverRequest = new ServerRequest ();
935- $ result = $ this ->subject ->evaluateRegistrationPrice ($ event , $ registration , $ serverRequest );
936-
937- self ::assertEquals (15.00 , $ result );
938- }
939-
940- #[Test]
941- public function getRegistrationTaxRateReturnsEventTaxRateIfNoPriceOption (): void
942- {
943- $ this ->importCSVDataSet (__DIR__ . '/../Fixtures/registration_price_calculations.csv ' );
944-
945- /** @var Registration $registration */
946- $ registration = $ this ->registrationRepository ->findByUid (4 );
947- $ event = $ registration ->getEvent ();
948-
949- $ result = $ this ->subject ->getRegistrationTaxRate ($ event , $ registration );
950-
951- self ::assertEquals (7.00 , $ result );
952- }
953-
954- #[Test]
955- public function getRegistrationTaxRateReturnsPriceOptionTaxRateIfSet (): void
956- {
957- $ this ->importCSVDataSet (__DIR__ . '/../Fixtures/registration_price_calculations.csv ' );
958-
959- /** @var Registration $registration */
960- $ registration = $ this ->registrationRepository ->findByUid (6 );
961- $ event = $ registration ->getEvent ();
962-
963- $ result = $ this ->subject ->getRegistrationTaxRate ($ event , $ registration );
964-
965- self ::assertEquals (7.00 , $ result );
966- }
967845}
0 commit comments