tests/phpunit/KebabCaseTest.php
/**
     * Testing that `glue` method is called and `lowerCase` property is used.
     *
     * @covers \Jawira\CaseConverter\Glue\KebabCase::glue
     * @throws \ReflectionException
     */
Testing that `glue` method is called and `lowerCase` property is used.
Testing that ` glue ` method is called and ` lowerCase ` property is used .
public function testGlue()
    {
        $mock = $this->getMockBuilder(KebabCase::class)
                     ->disableOriginalConstructor()
                     ->setMethods(['glueUsingRules'])
                     ->getMock();
        $reflectionObject  = new ReflectionObject($mock);
        $titleCaseProperty = $reflectionObject->getProperty('lowerCase');
        $titleCaseProperty->setAccessible(true);
        $titleCaseProperty->setValue($mock, 456);
        $mock->expects($this->once())
             ->method('glueUsingRules')
             ->with(KebabCase::DELIMITER, 456)
             ->willReturn('e1bfd762321e409cee4ac0b6e841963c');
        $returned = $mock->glue();
        $this->assertSame('e1bfd762321e409cee4ac0b6e841963c', $returned, 'Returned value is not the expected');
    }
public function testGlue ( ) { $ mock = $ this -> getMockBuilder ( KebabCase :: class ) -> disableOriginalConstructor ( ) -> setMethods ( [ 'glueUsingRules' ] ) -> getMock ( ) ; $ reflectionObject = new ReflectionObject ( $ mock ) ; $ titleCaseProperty = $ reflectionObject -> getProperty ( 'lowerCase' ) ; $ titleCaseProperty -> setAccessible ( true ) ; $ titleCaseProperty -> setValue ( $ mock , 456 ) ; $ mock -> expects ( $ this -> once ( ) ) -> method ( 'glueUsingRules' ) -> with ( KebabCase :: DELIMITER , 456 ) -> willReturn ( 'e1bfd762321e409cee4ac0b6e841963c' ) ; $ returned = $ mock -> glue ( ) ; $ this -> assertSame ( 'e1bfd762321e409cee4ac0b6e841963c' , $ returned , 'Returned value is not the expected' ) ; }
Testing that `glue` method is called and `lowerCase` property is used.
Testing that ` glue ` method is called and ` lowerCase ` property is used .
// Disabling constructor with one stub method // Setting lowerCase properties // Configuring stub /** @var \Jawira\CaseConverter\Glue\KebabCase $mock */