Caps_look
Uppercase the first character of each word in a string.example:
"Hello My Friends." => "hello my friends."
function caps($c) { return ucwords($c); }
public function caps($c){return ucwords($c);}- function caps($c) {
- return ucwords($c);
- }
<?php use PHPUnit\Framework\TestCase; class UpperallTest extends TestCase { public function testSampleTests() { $this->assertEquals("Hello My Friends.", caps("hello my friends.")); } }
- <?php
- use PHPUnit\Framework\TestCase;
class UpperallTest extends TestCase{public function testSampleTests(){$this->assertEquals("Hello My Friends.", $this->Upperall->caps("hello my friends."));}- class UpperallTest extends TestCase {
- public function testSampleTests() {
- $this->assertEquals("Hello My Friends.", caps("hello my friends."));
- }
- }
<?php use PHPUnit\Framework\TestCase; class UpperallTest extends TestCase { public function testSampleTests() { $this->assertEquals("Hello My Friends.", caps("hello my friends.")); } }
- <?php
- use PHPUnit\Framework\TestCase;
- class UpperallTest extends TestCase
- {
- public function testSampleTests()
- {
$this->assertEquals("Hello My Friends.", $this->Upperall->caps("hello my friends."));- $this->assertEquals("Hello My Friends.", caps("hello my friends."));
- }
- }
capslock
Uppercase the first character of each word in a string.public function caps($c)
{
return ucwords($c);
}
<?php
use PHPUnit\Framework\TestCase;
class UpperallTest extends TestCase
{
public function testSampleTests()
{
$this->assertEquals("Hello My Friends.", $this->Upperall->caps("hello my friends."));
}
}