Skip to content

Commit

Permalink
Merge pull request #26 from WebFiori/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
usernane authored Jun 26, 2022
2 parents 932c478 + b780030 commit 0858b25
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/webfiori/tests/http/HttpCookieTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ public function testConstructor03() {
$cookie->setDomain();
$this->assertEquals('new-cookie=super; path=/; SameSite=Lax', $cookie.'');

$this->assertEquals('set-cookie :new-cookie=super; path=/; SameSite=Lax', $cookie->getHeader().'');
$this->assertEquals('set-cookie: new-cookie=super; path=/; SameSite=Lax', $cookie->getHeader().'');
$cookie->setDomain('webfiori.com');
$this->assertEquals('set-cookie :new-cookie=super; domain=webfiori.com; path=/; SameSite=Lax', $cookie->getHeader().'');
$this->assertEquals('set-cookie: new-cookie=super; domain=webfiori.com; path=/; SameSite=Lax', $cookie->getHeader().'');
$cookie->kill();
$this->assertEquals(date(DATE_COOKIE, time() - 60*60*24), $cookie->getLifetime());
}
Expand Down
6 changes: 3 additions & 3 deletions tests/webfiori/tests/http/HttpHeaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function test00() {
$header = new HttpHeader();
$this->assertEquals('http-header', $header->getName());
$this->assertEquals('', $header->getValue());
$this->assertEquals('http-header :', $header);
$this->assertEquals('http-header: ', $header);
}
/**
* @test
Expand All @@ -25,7 +25,7 @@ public function test01() {
$header = new HttpHeader('User-Agent', 'Chrome');
$this->assertEquals('user-agent', $header->getName());
$this->assertEquals('Chrome', $header->getValue());
$this->assertEquals('user-agent :Chrome', $header);
$this->assertEquals('user-agent: Chrome', $header);
}
/**
* @test
Expand All @@ -34,6 +34,6 @@ public function test02() {
$header = new HttpHeader('User Agent', 'Chrome');
$this->assertEquals('http-header', $header->getName());
$this->assertEquals('Chrome', $header->getValue());
$this->assertEquals('http-header :Chrome', $header);
$this->assertEquals('http-header: Chrome', $header);
}
}
2 changes: 1 addition & 1 deletion webfiori/http/HttpHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(string $name = '', string $value = '') {
* by a colon (":") and the header value.
*/
public function __toString() {
return $this->getName().' :'.$this->getValue();
return $this->getName().': '.$this->getValue();
}
/**
* Returns a string that represents the name of the header.
Expand Down

0 comments on commit 0858b25

Please sign in to comment.