Code Duplication    Length = 10-10 lines in 2 locations

Tests/Units/MethodMetadataTests.php 1 location

@@ 105-114 (lines=10) @@
102
    /**
103
     * Test invoke method.
104
     */
105
    public function testInvoke()
106
    {
107
        $this
108
            ->given($user = new User(UserId::next(), 'Ivan', 'ivannis', 36, '[email protected]'))
109
            ->when($methodMetadata = $this->createMethodMetadata(User::class, 'username'))
110
            ->then()
111
                ->string($methodMetadata->invoke($user)->toNative())
112
                    ->isEqualTo('ivannis')
113
        ;
114
    }
115
116
    /**
117
     * Test Serialize/Unserialize method.

Tests/Units/PropertyMetadataTests.php 1 location

@@ 105-114 (lines=10) @@
102
    /**
103
     * Test GetValue method.
104
     */
105
    public function testGetValue()
106
    {
107
        $this
108
            ->given($user = new User(UserId::next(), 'Ivan', 'ivannis', 36, '[email protected]'))
109
            ->when($propertyMetadata = $this->createPropertyMetadata(User::class, 'username'))
110
            ->then()
111
                ->string($propertyMetadata->getValue($user)->toNative())
112
                    ->isEqualTo('ivannis')
113
        ;
114
    }
115
116
    /**
117
     * Test SetValue method.