diff --git a/spec/Exception/TreeExceptionSpec.php b/spec/Exception/TreeExceptionSpec.php index d059755..1ec7a2c 100644 --- a/spec/Exception/TreeExceptionSpec.php +++ b/spec/Exception/TreeExceptionSpec.php @@ -19,12 +19,12 @@ function let() function it_is_initializable() { - $this->shouldHaveType(TreeException::CLASS); + $this->shouldHaveType(TreeException::class); } function it_is_throwable() { - $this->shouldHaveType(\Throwable::CLASS); + $this->shouldHaveType(\Throwable::class); } function it_contains_error_messages() diff --git a/spec/MessageRetrieverSpec.php b/spec/MessageRetrieverSpec.php index a038a07..cb51f78 100644 --- a/spec/MessageRetrieverSpec.php +++ b/spec/MessageRetrieverSpec.php @@ -12,7 +12,7 @@ class MessageRetrieverSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(MessageRetriever::CLASS); + $this->shouldHaveType(MessageRetriever::class); } function it_reads_message_from_single_id() diff --git a/spec/Money/SignalMoneyFormatterSpec.php b/spec/Money/SignalMoneyFormatterSpec.php index 2afae36..7e60406 100644 --- a/spec/Money/SignalMoneyFormatterSpec.php +++ b/spec/Money/SignalMoneyFormatterSpec.php @@ -15,12 +15,12 @@ class SignalMoneyFormatterSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(SignalMoneyFormatter::CLASS); + $this->shouldHaveType(SignalMoneyFormatter::class); } function it_is_a_money_formatter() { - $this->shouldHaveType(MoneyFormatter::CLASS); + $this->shouldHaveType(MoneyFormatter::class); } function it_fails_on_non_sek_money() diff --git a/spec/Money/SignalMoneyParserSpec.php b/spec/Money/SignalMoneyParserSpec.php index 0e6d05e..5edf05d 100644 --- a/spec/Money/SignalMoneyParserSpec.php +++ b/spec/Money/SignalMoneyParserSpec.php @@ -15,12 +15,12 @@ class SignalMoneyParserSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(SignalMoneyParser::CLASS); + $this->shouldHaveType(SignalMoneyParser::class); } function it_is_a_money_parser() { - $this->shouldHaveType(MoneyParser::CLASS); + $this->shouldHaveType(MoneyParser::class); } function it_fails_on_non_string() diff --git a/spec/Parser/ParserFactorySpec.php b/spec/Parser/ParserFactorySpec.php index ae95a51..fad96c6 100644 --- a/spec/Parser/ParserFactorySpec.php +++ b/spec/Parser/ParserFactorySpec.php @@ -12,16 +12,16 @@ class ParserFactorySpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(ParserFactory::CLASS); + $this->shouldHaveType(ParserFactory::class); } function it_creates_parsers() { - $this->createParser()->shouldHaveType(ParserInterface::CLASS); + $this->createParser()->shouldHaveType(ParserInterface::class); } function it_creates_parses_with_no_external_visitors() { - $this->createParser(ParserFactory::VISITOR_IGNORE_OBJECTS)->shouldHaveType(ParserInterface::CLASS); + $this->createParser(ParserFactory::VISITOR_IGNORE_OBJECTS)->shouldHaveType(ParserInterface::class); } } diff --git a/spec/Parser/ParserSpec.php b/spec/Parser/ParserSpec.php index 1a657b2..d862cf8 100644 --- a/spec/Parser/ParserSpec.php +++ b/spec/Parser/ParserSpec.php @@ -22,12 +22,12 @@ function let(Grammar $grammar, VisitorInterface $visitor) function it_is_initializable() { - $this->shouldHaveType(Parser::CLASS); + $this->shouldHaveType(Parser::class); } function it_is_a_parser() { - $this->shouldHaveType(ParserInterface::CLASS); + $this->shouldHaveType(ParserInterface::class); } function it_creates_trees($grammar, $visitor, Node $node) @@ -40,7 +40,7 @@ function it_creates_trees($grammar, $visitor, Node $node) function it_throws_parser_exception_if_grammar_fails($grammar) { $grammar->parse('invalid-ag-file')->willThrow('\InvalidArgumentException'); - $this->shouldThrow(ParserException::CLASS)->duringParse('invalid-ag-file'); + $this->shouldThrow(ParserException::class)->duringParse('invalid-ag-file'); } function it_converts_to_utf8($grammar, $visitor, Node $node) diff --git a/spec/Tree/AutogiroFileSpec.php b/spec/Tree/AutogiroFileSpec.php index 7c3316b..5064d90 100644 --- a/spec/Tree/AutogiroFileSpec.php +++ b/spec/Tree/AutogiroFileSpec.php @@ -18,12 +18,12 @@ function let() function it_is_initializable() { - $this->shouldHaveType(AutogiroFile::CLASS); + $this->shouldHaveType(AutogiroFile::class); } function it_is_a_container_node() { - $this->shouldHaveType(Container::CLASS); + $this->shouldHaveType(Container::class); } function it_contains_a_name() diff --git a/spec/Tree/ContainerSpec.php b/spec/Tree/ContainerSpec.php index 9b11a56..2d10db6 100644 --- a/spec/Tree/ContainerSpec.php +++ b/spec/Tree/ContainerSpec.php @@ -13,12 +13,12 @@ class ContainerSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(Container::CLASS); + $this->shouldHaveType(Container::class); } function it_implements_node_interface() { - $this->shouldHaveType(Node::CLASS); + $this->shouldHaveType(Node::class); } function it_contains_a_default_name() diff --git a/spec/Tree/CountSpec.php b/spec/Tree/CountSpec.php index b36cd05..246dd58 100644 --- a/spec/Tree/CountSpec.php +++ b/spec/Tree/CountSpec.php @@ -22,12 +22,12 @@ function let(Node $count) function it_is_initializable() { - $this->shouldHaveType(Count::CLASS); + $this->shouldHaveType(Count::class); } function it_is_a_container() { - $this->shouldHaveType(Container::CLASS); + $this->shouldHaveType(Container::class); } function it_contains_a_name() diff --git a/spec/Tree/DateSpec.php b/spec/Tree/DateSpec.php index ad45804..4849a40 100644 --- a/spec/Tree/DateSpec.php +++ b/spec/Tree/DateSpec.php @@ -12,12 +12,12 @@ class DateSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(Date::CLASS); + $this->shouldHaveType(Date::class); } function it_implements_node_interface() { - $this->shouldHaveType(Node::CLASS); + $this->shouldHaveType(Node::class); } function it_contains_a_name() diff --git a/spec/Tree/FlagSpec.php b/spec/Tree/FlagSpec.php index 475e8bf..991cdac 100644 --- a/spec/Tree/FlagSpec.php +++ b/spec/Tree/FlagSpec.php @@ -17,12 +17,12 @@ function let() function it_is_initializable() { - $this->shouldHaveType(Flag::CLASS); + $this->shouldHaveType(Flag::class); } function it_is_a_node() { - $this->shouldHaveType(Node::CLASS); + $this->shouldHaveType(Node::class); } function it_contains_a_name() diff --git a/spec/Tree/ImmediateDateSpec.php b/spec/Tree/ImmediateDateSpec.php index fe917fa..a834b33 100644 --- a/spec/Tree/ImmediateDateSpec.php +++ b/spec/Tree/ImmediateDateSpec.php @@ -12,12 +12,12 @@ class ImmediateDateSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(ImmediateDate::CLASS); + $this->shouldHaveType(ImmediateDate::class); } function it_implements_node_interface() { - $this->shouldHaveType(Node::CLASS); + $this->shouldHaveType(Node::class); } function it_contains_a_name() diff --git a/spec/Tree/MessageSpec.php b/spec/Tree/MessageSpec.php index 0027ba5..29daa0c 100644 --- a/spec/Tree/MessageSpec.php +++ b/spec/Tree/MessageSpec.php @@ -12,12 +12,12 @@ class MessageSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(Message::CLASS); + $this->shouldHaveType(Message::class); } function it_is_a_container() { - $this->shouldHaveType(Container::CLASS); + $this->shouldHaveType(Container::class); } function it_contains_a_name() diff --git a/spec/Tree/NodeSpec.php b/spec/Tree/NodeSpec.php index 17a21d8..17a4066 100644 --- a/spec/Tree/NodeSpec.php +++ b/spec/Tree/NodeSpec.php @@ -13,7 +13,7 @@ class NodeSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(Node::CLASS); + $this->shouldHaveType(Node::class); } function it_contains_a_name() @@ -71,7 +71,7 @@ function it_can_have_children(Node $node) function it_defaults_undefined_child_to_null_node() { - $this->getChild('this-is-not-definied')->shouldHaveType(NullNode::CLASS); + $this->getChild('this-is-not-definied')->shouldHaveType(NullNode::class); } function it_identifies_child_nodes_insensitive_to_case(Node $node) diff --git a/spec/Tree/NullNodeSpec.php b/spec/Tree/NullNodeSpec.php index c11a6b1..80609f2 100644 --- a/spec/Tree/NullNodeSpec.php +++ b/spec/Tree/NullNodeSpec.php @@ -13,12 +13,12 @@ class NullNodeSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(NullNode::CLASS); + $this->shouldHaveType(NullNode::class); } function it_implements_node_interface() { - $this->shouldHaveType(Node::CLASS); + $this->shouldHaveType(Node::class); } function it_contains_a_name() diff --git a/spec/Tree/NumberSpec.php b/spec/Tree/NumberSpec.php index d961a5e..76e0c10 100644 --- a/spec/Tree/NumberSpec.php +++ b/spec/Tree/NumberSpec.php @@ -12,12 +12,12 @@ class NumberSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(Number::CLASS); + $this->shouldHaveType(Number::class); } function it_implements_node_interface() { - $this->shouldHaveType(Node::CLASS); + $this->shouldHaveType(Node::class); } function it_contains_a_default_name() diff --git a/spec/Tree/ObjSpec.php b/spec/Tree/ObjSpec.php index 52345fb..c1aaee9 100644 --- a/spec/Tree/ObjSpec.php +++ b/spec/Tree/ObjSpec.php @@ -12,12 +12,12 @@ class ObjSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(Obj::CLASS); + $this->shouldHaveType(Obj::class); } function it_implements_node_interface() { - $this->shouldHaveType(Node::CLASS); + $this->shouldHaveType(Node::class); } function it_contains_a_default_name() diff --git a/spec/Tree/RecordSpec.php b/spec/Tree/RecordSpec.php index 9ebea01..378edc6 100644 --- a/spec/Tree/RecordSpec.php +++ b/spec/Tree/RecordSpec.php @@ -17,7 +17,7 @@ function let() function it_is_initializable() { - $this->shouldHaveType(Record::CLASS); + $this->shouldHaveType(Record::class); } function it_contains_a_name() diff --git a/spec/Tree/SectionSpec.php b/spec/Tree/SectionSpec.php index bdf8589..025a33d 100644 --- a/spec/Tree/SectionSpec.php +++ b/spec/Tree/SectionSpec.php @@ -21,12 +21,12 @@ function let(Record $nodeA, Record $nodeB) function it_is_initializable() { - $this->shouldHaveType(Section::CLASS); + $this->shouldHaveType(Section::class); } function it_is_a_container() { - $this->shouldHaveType(Container::CLASS); + $this->shouldHaveType(Container::class); } function it_contains_a_name() diff --git a/spec/Tree/SummarySpec.php b/spec/Tree/SummarySpec.php index 13388d8..0df5b6c 100644 --- a/spec/Tree/SummarySpec.php +++ b/spec/Tree/SummarySpec.php @@ -22,12 +22,12 @@ function let(Node $amount) function it_is_initializable() { - $this->shouldHaveType(Summary::CLASS); + $this->shouldHaveType(Summary::class); } function it_is_a_container() { - $this->shouldHaveType(Container::CLASS); + $this->shouldHaveType(Container::class); } function it_contains_a_name() diff --git a/spec/Tree/TextSpec.php b/spec/Tree/TextSpec.php index dffef50..544f49b 100644 --- a/spec/Tree/TextSpec.php +++ b/spec/Tree/TextSpec.php @@ -12,12 +12,12 @@ class TextSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(Text::CLASS); + $this->shouldHaveType(Text::class); } function it_implements_node_interface() { - $this->shouldHaveType(Node::CLASS); + $this->shouldHaveType(Node::class); } function it_contains_a_default_name() diff --git a/spec/Visitor/AccountVisitorSpec.php b/spec/Visitor/AccountVisitorSpec.php index 2696661..3a94133 100644 --- a/spec/Visitor/AccountVisitorSpec.php +++ b/spec/Visitor/AccountVisitorSpec.php @@ -27,7 +27,7 @@ function let( function it_is_initializable() { - $this->shouldHaveType(AccountVisitor::CLASS); + $this->shouldHaveType(AccountVisitor::class); } function it_fails_on_unvalid_account_number(Node $node, $accountFactory, $errorObj) @@ -36,7 +36,7 @@ function it_fails_on_unvalid_account_number(Node $node, $accountFactory, $errorO $node->hasChild(Node::OBJ)->willReturn(false); $node->getValueFrom(Node::NUMBER)->willReturn('not-valid'); - $accountFactory->createAccount('not-valid')->willThrow(BankingException::CLASS); + $accountFactory->createAccount('not-valid')->willThrow(BankingException::class); $this->beforeAccount($node); $errorObj->addError(Argument::type('string'), Argument::cetera())->shouldHaveBeenCalledTimes(1); @@ -81,7 +81,7 @@ function it_fails_on_unvalid_bankgiro_number(Node $node, $bankgiroFactory, $erro $node->hasChild(Node::OBJ)->willReturn(false); $node->getValueFrom(Node::NUMBER)->willReturn('not-valid'); - $bankgiroFactory->createAccount('not-valid')->willThrow(BankingException::CLASS); + $bankgiroFactory->createAccount('not-valid')->willThrow(BankingException::class); $this->beforePayeeBankgiro($node); $errorObj->addError(Argument::type('string'), Argument::cetera())->shouldHaveBeenCalledTimes(1); diff --git a/spec/Visitor/AmountVisitorSpec.php b/spec/Visitor/AmountVisitorSpec.php index e5708ac..ff09989 100644 --- a/spec/Visitor/AmountVisitorSpec.php +++ b/spec/Visitor/AmountVisitorSpec.php @@ -22,7 +22,7 @@ function let(ErrorObject $errorObj, MoneyParser $moneyParser) function it_is_initializable() { - $this->shouldHaveType(AmountVisitor::CLASS); + $this->shouldHaveType(AmountVisitor::class); } function it_does_not_create_amount_if_object_exists(Node $node) diff --git a/spec/Visitor/CountingVisitorSpec.php b/spec/Visitor/CountingVisitorSpec.php index 01e08d7..2e7ce0d 100644 --- a/spec/Visitor/CountingVisitorSpec.php +++ b/spec/Visitor/CountingVisitorSpec.php @@ -19,7 +19,7 @@ function let(ErrorObject $errorObj) function it_is_initializable() { - $this->shouldHaveType(CountingVisitor::CLASS); + $this->shouldHaveType(CountingVisitor::class); } function it_validates_record_counts(Node $count, Node $record, $errorObj) diff --git a/spec/Visitor/DateVisitorSpec.php b/spec/Visitor/DateVisitorSpec.php index 5c55429..866423e 100644 --- a/spec/Visitor/DateVisitorSpec.php +++ b/spec/Visitor/DateVisitorSpec.php @@ -20,7 +20,7 @@ function let(ErrorObject $errorObj) function it_is_initializable() { - $this->shouldHaveType(DateVisitor::CLASS); + $this->shouldHaveType(DateVisitor::class); } function it_does_not_create_if_date_object_exists(Node $node) diff --git a/spec/Visitor/ErrorObjectSpec.php b/spec/Visitor/ErrorObjectSpec.php index 7780876..5abd524 100644 --- a/spec/Visitor/ErrorObjectSpec.php +++ b/spec/Visitor/ErrorObjectSpec.php @@ -11,7 +11,7 @@ class ErrorObjectSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(ErrorObject::CLASS); + $this->shouldHaveType(ErrorObject::class); } function it_defaults_to_no_error() diff --git a/spec/Visitor/MessageVisitorSpec.php b/spec/Visitor/MessageVisitorSpec.php index 1450253..55e6a62 100644 --- a/spec/Visitor/MessageVisitorSpec.php +++ b/spec/Visitor/MessageVisitorSpec.php @@ -21,7 +21,7 @@ function let(ErrorObject $errorObj, MessageRetriever $messages) function it_is_initializable() { - $this->shouldHaveType(MessageVisitor::CLASS); + $this->shouldHaveType(MessageVisitor::class); } function it_fails_on_unvalid_message(Node $file, Node $record, Node $msg, $errorObj, $messages) diff --git a/spec/Visitor/NumberVisitorSpec.php b/spec/Visitor/NumberVisitorSpec.php index 293c5b7..9b8e7c4 100644 --- a/spec/Visitor/NumberVisitorSpec.php +++ b/spec/Visitor/NumberVisitorSpec.php @@ -19,7 +19,7 @@ function let(ErrorObject $errorObj) function it_is_initializable() { - $this->shouldHaveType(NumberVisitor::CLASS); + $this->shouldHaveType(NumberVisitor::class); } function it_captures_invalid_nodes(Number $node, $errorObj) diff --git a/spec/Visitor/PayeeVisitorSpec.php b/spec/Visitor/PayeeVisitorSpec.php index 0d8d8ff..1a43bba 100644 --- a/spec/Visitor/PayeeVisitorSpec.php +++ b/spec/Visitor/PayeeVisitorSpec.php @@ -14,7 +14,7 @@ class PayeeVisitorSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(PayeeVisitor::CLASS); + $this->shouldHaveType(PayeeVisitor::class); } function let( diff --git a/spec/Visitor/PaymentVisitorSpec.php b/spec/Visitor/PaymentVisitorSpec.php index 886398f..a312e7e 100644 --- a/spec/Visitor/PaymentVisitorSpec.php +++ b/spec/Visitor/PaymentVisitorSpec.php @@ -20,7 +20,7 @@ function let(ErrorObject $errorObj) function it_is_initializable() { - $this->shouldHaveType(PaymentVisitor::CLASS); + $this->shouldHaveType(PaymentVisitor::class); } function it_fails_if_interval_is_used_with_immediate_date_in_incoming_payment( diff --git a/spec/Visitor/StateIdVisitorSpec.php b/spec/Visitor/StateIdVisitorSpec.php index 7573dd0..cc7c10e 100644 --- a/spec/Visitor/StateIdVisitorSpec.php +++ b/spec/Visitor/StateIdVisitorSpec.php @@ -27,7 +27,7 @@ function let( function it_is_initializable() { - $this->shouldHaveType(StateIdVisitor::CLASS); + $this->shouldHaveType(StateIdVisitor::class); } function it_does_not_create_id_if_object_is_set(Node $node) @@ -51,7 +51,7 @@ function it_fails_on_unvalid_organizational_id(Node $node, $organizationIdFactor $node->hasChild(Node::OBJ)->willReturn(false); $node->getValueFrom(Node::NUMBER)->willReturn('99-not-a-valid-id'); - $organizationIdFactory->createId('-not-a-valid-id')->willThrow(IdException::CLASS); + $organizationIdFactory->createId('-not-a-valid-id')->willThrow(IdException::class); $this->beforeStateId($node); $errorObj->addError(Argument::type('string'), Argument::cetera())->shouldHaveBeenCalledTimes(1); @@ -78,7 +78,7 @@ function it_fails_on_unvalid_personal_id(Node $node, $personalIdFactory, $errorO $node->hasChild(Node::OBJ)->willReturn(false); $node->getValueFrom(Node::NUMBER)->willReturn('not-valid'); - $personalIdFactory->createId('not-valid')->willThrow(IdException::CLASS); + $personalIdFactory->createId('not-valid')->willThrow(IdException::class); $this->beforeStateId($node); $errorObj->addError(Argument::type('string'), Argument::cetera())->shouldHaveBeenCalledTimes(1); diff --git a/spec/Visitor/SummaryVisitorSpec.php b/spec/Visitor/SummaryVisitorSpec.php index 79d6ce8..fdeabf4 100644 --- a/spec/Visitor/SummaryVisitorSpec.php +++ b/spec/Visitor/SummaryVisitorSpec.php @@ -20,7 +20,7 @@ function let(ErrorObject $errorObj) function it_is_initializable() { - $this->shouldHaveType(SummaryVisitor::CLASS); + $this->shouldHaveType(SummaryVisitor::class); } function it_validates_summary( diff --git a/spec/Visitor/TextVisitorSpec.php b/spec/Visitor/TextVisitorSpec.php index cf258ea..862e5e0 100644 --- a/spec/Visitor/TextVisitorSpec.php +++ b/spec/Visitor/TextVisitorSpec.php @@ -19,7 +19,7 @@ function let(ErrorObject $errorObj) function it_is_initializable() { - $this->shouldHaveType(TextVisitor::CLASS); + $this->shouldHaveType(TextVisitor::class); } function it_captures_invalid_text_nodes(Text $textNode, $errorObj) diff --git a/spec/Visitor/VisitorContainerSpec.php b/spec/Visitor/VisitorContainerSpec.php index 488b71f..9a6a68f 100644 --- a/spec/Visitor/VisitorContainerSpec.php +++ b/spec/Visitor/VisitorContainerSpec.php @@ -21,7 +21,7 @@ function let(ErrorObject $errorObj) function it_is_initializable() { - $this->shouldHaveType(VisitorContainer::CLASS); + $this->shouldHaveType(VisitorContainer::class); } function it_can_load_visitors(VisitorInterface $visitorA, VisitorInterface $visitorB) @@ -59,7 +59,7 @@ function it_throws_exception_on_errors($errorObj, Node $node) $node->getType()->willReturn(''); $errorObj->hasErrors()->willReturn(true); $errorObj->getErrors()->willReturn(['an error']); - $this->shouldThrow(TreeException::CLASS)->duringVisitAfter($node); + $this->shouldThrow(TreeException::class)->duringVisitAfter($node); } function it_resets_errors($errorObj, Node $node) diff --git a/spec/Visitor/VisitorFactorySpec.php b/spec/Visitor/VisitorFactorySpec.php index 5ff8826..b70de1d 100644 --- a/spec/Visitor/VisitorFactorySpec.php +++ b/spec/Visitor/VisitorFactorySpec.php @@ -13,12 +13,12 @@ class VisitorFactorySpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(VisitorFactory::CLASS); + $this->shouldHaveType(VisitorFactory::class); } function it_creates_visitors() { - $this->createVisitors()->shouldHaveType(VisitorInterface::CLASS); + $this->createVisitors()->shouldHaveType(VisitorInterface::class); } function it_creates_visitors_with_no_external_visitors() diff --git a/spec/Visitor/VisitorSpec.php b/spec/Visitor/VisitorSpec.php index e85796d..f592292 100644 --- a/spec/Visitor/VisitorSpec.php +++ b/spec/Visitor/VisitorSpec.php @@ -12,7 +12,7 @@ class VisitorSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(Visitor::CLASS); + $this->shouldHaveType(Visitor::class); } function it_ignores_unknown_nodes(Node $node) diff --git a/spec/Writer/OutputSpec.php b/spec/Writer/OutputSpec.php index 3a125e7..dc7cb9a 100644 --- a/spec/Writer/OutputSpec.php +++ b/spec/Writer/OutputSpec.php @@ -12,7 +12,7 @@ class OutputSpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(Output::CLASS); + $this->shouldHaveType(Output::class); } function it_captures_output() diff --git a/spec/Writer/PrintingVisitorSpec.php b/spec/Writer/PrintingVisitorSpec.php index cf204b8..5f96581 100644 --- a/spec/Writer/PrintingVisitorSpec.php +++ b/spec/Writer/PrintingVisitorSpec.php @@ -27,12 +27,12 @@ function let(MoneyFormatter $moneyFormatter, Output $output) function it_is_initializable() { - $this->shouldHaveType(PrintingVisitor::CLASS); + $this->shouldHaveType(PrintingVisitor::class); } function it_is_a_visitor() { - $this->shouldHaveType(Visitor::CLASS); + $this->shouldHaveType(Visitor::class); } function it_prints_dates(Node $node, $output) @@ -119,7 +119,7 @@ function it_prints_intervals(Node $node, $output) function it_fails_on_invalid_intervals(Node $node, $output) { $node->getValue()->willReturn('9'); - $this->shouldThrow(RuntimeException::CLASS)->duringBeforeInterval($node); + $this->shouldThrow(RuntimeException::class)->duringBeforeInterval($node); $output->write(Argument::any())->shouldNotHaveBeenCalled(); } @@ -147,7 +147,7 @@ function it_pads_repititions(Node $node, $output) function it_fails_on_invalid_repititions(Node $node, $output) { $node->getValue()->willReturn('1000'); - $this->shouldThrow(RuntimeException::CLASS)->duringBeforeRepetitions($node); + $this->shouldThrow(RuntimeException::class)->duringBeforeRepetitions($node); $output->write(Argument::any())->shouldNotHaveBeenCalled(); } @@ -169,13 +169,13 @@ function it_fails_on_non_sek_amounts(Node $node) function it_fails_on_to_large_amounts(Node $node) { $node->getValue()->willReturn(Money::SEK('1000000000000')); - $this->shouldThrow(RuntimeException::CLASS)->duringBeforeAmount($node); + $this->shouldThrow(RuntimeException::class)->duringBeforeAmount($node); } function it_fails_on_to_small_amounts(Node $node) { $node->getValue()->willReturn(Money::SEK('-1000000000000')); - $this->shouldThrow(RuntimeException::CLASS)->duringBeforeAmount($node); + $this->shouldThrow(RuntimeException::class)->duringBeforeAmount($node); } function it_ignores_missing_amounts(Node $node, $output) diff --git a/spec/Writer/TreeBuilderSpec.php b/spec/Writer/TreeBuilderSpec.php index 86818dd..00a823e 100644 --- a/spec/Writer/TreeBuilderSpec.php +++ b/spec/Writer/TreeBuilderSpec.php @@ -35,7 +35,7 @@ function let(AccountNumber $bankgiro, \DateTime $date) function it_is_initializable() { - $this->shouldHaveType(TreeBuilder::CLASS); + $this->shouldHaveType(TreeBuilder::class); } function it_can_reset() diff --git a/spec/Writer/WriterFactorySpec.php b/spec/Writer/WriterFactorySpec.php index 1b2c2d0..7a22862 100644 --- a/spec/Writer/WriterFactorySpec.php +++ b/spec/Writer/WriterFactorySpec.php @@ -14,13 +14,13 @@ class WriterFactorySpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(WriterFactory::CLASS); + $this->shouldHaveType(WriterFactory::class); } function it_creates_writers(AccountNumber $bankgiro, \DateTime $date) { $bankgiro->getNumber()->willReturn(''); $date->format(Argument::any())->willReturn(''); - $this->createWriter('bgc_cust', $bankgiro, $date)->shouldHaveType(WriterInterface::CLASS); + $this->createWriter('bgc_cust', $bankgiro, $date)->shouldHaveType(WriterInterface::class); } } diff --git a/spec/Writer/WriterSpec.php b/spec/Writer/WriterSpec.php index c3f631a..6f710ca 100644 --- a/spec/Writer/WriterSpec.php +++ b/spec/Writer/WriterSpec.php @@ -25,13 +25,13 @@ function let(TreeBuilder $treeBuilder, PrintingVisitor $printer) function it_is_initializable() { - $this->shouldHaveType(Writer::CLASS); + $this->shouldHaveType(Writer::class); } function it_can_create_content($treeBuilder, $printer, Node $tree) { $treeBuilder->buildTree()->willReturn($tree)->shouldBeCalled(); - $printer->setOutput(Argument::type(Output::CLASS))->shouldBeCalled(); + $printer->setOutput(Argument::type(Output::class))->shouldBeCalled(); $tree->accept($printer)->shouldBeCalled(); $this->getContent()->shouldEqual(''); } diff --git a/spec/Xml/StringifierSpec.php b/spec/Xml/StringifierSpec.php index 0b22e46..e9585a3 100644 --- a/spec/Xml/StringifierSpec.php +++ b/spec/Xml/StringifierSpec.php @@ -19,7 +19,7 @@ function let(MoneyFormatter $moneyFormatter) function it_is_initializable() { - $this->shouldHaveType(Stringifier::CLASS); + $this->shouldHaveType(Stringifier::class); } function it_casts_scalars() diff --git a/spec/Xml/XmlWriterFactorySpec.php b/spec/Xml/XmlWriterFactorySpec.php index 8363e6a..fe73c78 100644 --- a/spec/Xml/XmlWriterFactorySpec.php +++ b/spec/Xml/XmlWriterFactorySpec.php @@ -13,11 +13,11 @@ class XmlWriterFactorySpec extends ObjectBehavior { function it_is_initializable() { - $this->shouldHaveType(XmlWriterFactory::CLASS); + $this->shouldHaveType(XmlWriterFactory::class); } function it_can_create_writers() { - $this->createXmlWriter()->shouldHaveType(XmlWriter::CLASS); + $this->createXmlWriter()->shouldHaveType(XmlWriter::class); } } diff --git a/spec/Xml/XmlWriterSpec.php b/spec/Xml/XmlWriterSpec.php index 08e9d4d..8e8c4aa 100644 --- a/spec/Xml/XmlWriterSpec.php +++ b/spec/Xml/XmlWriterSpec.php @@ -20,12 +20,12 @@ function let(Stringifier $stringifier) function it_is_initializable() { - $this->shouldHaveType(XmlWriter::CLASS); + $this->shouldHaveType(XmlWriter::class); } function it_can_generate_xml(Node $node) { - $node->accept(Argument::type(XmlWritingVisitor::CLASS))->shouldBeCalled(); + $node->accept(Argument::type(XmlWritingVisitor::class))->shouldBeCalled(); $this->asXml($node)->shouldBeString(); } } diff --git a/spec/Xml/XmlWritingVisitorSpec.php b/spec/Xml/XmlWritingVisitorSpec.php index bd80a86..a17f8a5 100644 --- a/spec/Xml/XmlWritingVisitorSpec.php +++ b/spec/Xml/XmlWritingVisitorSpec.php @@ -19,7 +19,7 @@ function let(\XMLWriter $writer, Stringifier $stringifier) function it_is_initializable() { - $this->shouldHaveType(XmlWritingVisitor::CLASS); + $this->shouldHaveType(XmlWritingVisitor::class); } function it_writes_elements_before(Node $node, $writer, $stringifier)