Beispiel #1
0
 /** @test */
 public function should_create_setting()
 {
     $setting = new Setting(SettingId::generate(), $this->user, 'new_follower');
     $this->assertInstanceOf('Cribbb\\Domain\\Model\\Identity\\Setting', $setting);
     $this->assertInstanceOf('Cribbb\\Domain\\Model\\Identity\\SettingId', $setting->id());
     $this->assertInstanceOf('Cribbb\\Domain\\Model\\Identity\\User', $setting->user());
     $this->assertEquals('new_follower', $setting->key());
 }
Beispiel #2
0
 /** @test */
 public function should_test_equality()
 {
     $one = SettingId::fromString('d16f9fe7-e947-460e-99f6-2d64d65f46bc');
     $two = SettingId::fromString('d16f9fe7-e947-460e-99f6-2d64d65f46bc');
     $three = SettingId::generate();
     $this->assertTrue($one->equals($two));
     $this->assertFalse($one->equals($three));
 }