19 declare(strict_types=1);
26 require_once(
"vendor/composer/vendor/autoload.php");
44 $this->assertEquals([], $this->mock->getHelpTopics());
50 $mock = $this->mock->withHelpTopics(...
$topics);
51 $this->assertEquals([], $this->mock->getHelpTopics());
52 $this->assertEquals(
$topics, $mock->getHelpTopics());
59 $mock = $this->mock->withHelpTopics(
$a);
60 $mock2 = $mock->withAdditionalHelpTopics(...
$topics);
61 $this->assertEquals([
$a], $mock->getHelpTopics());
63 $this->assertEquals($all_topics, $mock2->getHelpTopics());
70 $mock = $this->mock->withHelpTopics(...$topics1)->withHelpTopics(...$topics2);
71 $this->assertEquals($topics2, $mock->getHelpTopics());
78 $mock = $this->mock->withHelpTopics(...$dup_topics);
79 $this->assertEquals(
$topics, $mock->getHelpTopics());
86 $mock = $this->mock->withHelpTopics(
new Topic(
"c"))->withAdditionalHelpTopics(...$dup_topics);
87 $this->assertEquals(
$topics, $mock->getHelpTopics());
testWithAdditionalHelpTopicsDeduplicates()
This is just a class that marks a string as a help topic.
testAdditionalHelpTopics()
testWithHelpTopicsDeduplicates()
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
testWithHelpTopicsOverwrites()