We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c117ce commit 8c20201Copy full SHA for 8c20201
tests/Support/SupportMessageBagTest.php
@@ -115,6 +115,17 @@ public function testHasIndicatesExistence()
115
$this->assertFalse($container->has('bar'));
116
}
117
118
+ public function testAddIf()
119
+ {
120
+ $container = new MessageBag;
121
+ $container->setFormat(':message');
122
+ $container->addIf(true, 'foo', 'bar');
123
+ $this->assertTrue($container->has('foo'));
124
+
125
+ $container->addIf(false, 'bar', 'biz');
126
+ $this->assertFalse($container->has('bar'));
127
+ }
128
129
public function testHasWithKeyNull()
130
{
131
$container = new MessageBag;
0 commit comments