ILIAS  trunk Revision v11.0_alpha-1689-g66c127b4ae8
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
MarkerFactoryTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 
25 class MarkerFactoryTest extends TestCase
26 {
27  public function testCreateMarker(): void
28  {
29  $factory = new MarkerFactory();
30  $neutral_marker = $factory->marker(Action::NEUTRAL, 'value');
31  $create_marker = $factory->marker(Action::CREATE_OR_UPDATE, 'value');
32 
33  $this->assertInstanceOf(MarkerInterface::class, $neutral_marker);
34  $this->assertSame(Action::NEUTRAL, $neutral_marker->action());
35  $this->assertSame('', $neutral_marker->dataValue());
36 
37  $this->assertInstanceOf(MarkerInterface::class, $create_marker);
38  $this->assertSame(Action::CREATE_OR_UPDATE, $create_marker->action());
39  $this->assertSame('value', $create_marker->dataValue());
40  }
41 }