Пример #1
0
         expect($result)->toBe('no huaga chutanode da zhang fukanaato');
     });
 });
 describe("::slug()", function () {
     it("slugs a string", function () {
         $result = Inflector::slug('Foo:Bar & Cie');
         expect($result)->toBe('Foo-Bar-Cie');
         $result = Inflector::slug('Foo:Bar & Cie', '_');
         expect($result)->toBe('Foo_Bar_Cie');
     });
 });
 describe("::parameterize()", function () {
     it("parameterizes a string", function () {
         $result = Inflector::parameterize('Foo:Bar & Cie');
         expect($result)->toBe('foo-bar-cie');
         $result = Inflector::parameterize('Foo:Bar & Cie', '_');
         expect($result)->toBe('foo_bar_cie');
     });
 });
 describe("::underscore()", function () {
     it("underscores a string", function () {
         expect(Inflector::underscore('ClassName'))->toBe('class_name');
         expect(Inflector::underscore('TestField'))->toBe('test_field');
         expect(Inflector::underscore('MyName\\Space'))->toBe('my_name\\space');
         expect(Inflector::underscore('dashed-version'))->toBe('dashed_version');
     });
 });
 describe("::dasherize()", function () {
     it("dasherizes a string", function () {
         expect(Inflector::dasherize('class_name'))->toBe('class-name');
         expect(Inflector::dasherize('test_field'))->toBe('test-field');