Skip to content

Commit

Permalink
Use typeof() instead of Generic::getClass()
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Apr 5, 2020
1 parent 1071d21 commit 406d750
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/php/unittest/web/WebTestCase.class.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php namespace unittest\web;

use unittest\TestCase;
use io\streams\Streams;
use lang\IllegalArgumentException;
use peer\http\HttpConnection;
use peer\http\HttpConstants;
use scriptlet\Cookie;
use text\regex\Pattern;
use io\streams\Streams;
use unittest\TestCase;
use xml\XPath;
use scriptlet\Cookie;
use lang\IllegalArgumentException;

/**
* TestCase for web sites
Expand Down Expand Up @@ -48,7 +48,7 @@ protected function getConnection($url= null) {
*/
public function __construct($name, $url= null) {
parent::__construct($name);
$class= $this->getClass();
$class= typeof($this);
if ($class->hasAnnotation('webtest', 'url')) {
$this->conn= $this->getConnection($class->getAnnotation('webtest', 'url'));
} else {
Expand Down

0 comments on commit 406d750

Please sign in to comment.