コード例 #1
0
            expect($actual)->to->be->instanceof('Notes\\Domain\\Entity\\User');
        });
    });
    describe('->setEmail()', function () {
        it('should change the email property of this UserBuilder object.', function () {
            $builder = new UserBuilder();
            $faker = \Faker\Factory::create();
            $email = $faker->email;
            $builder->setEmail($email);
            expect($builder->getEmail())->equal($email);
        });
    });
    describe('->setFirstname()', function () {
        it('should change the firstname property of this UserBuilder object.', function () {
            $builder = new UserBuilder();
            $faker = \Faker\Factory::create();
            $firstname = $faker->firstName;
            $builder->setFirstname($firstname);
            expect($builder->getFirstname())->equal($firstname);
        });
    });
    describe('->setLastname()', function () {
        it('should change the lastname property of this UserBuilder object.', function () {
            $builder = new UserBuilder();
            $faker = \Faker\Factory::create();
            $lastname = $faker->userName;
            $builder->setLastname($lastname);
            expect($builder->getLastname())->equal($lastname);
        });
    });
});