2016-08-19 17:44:37 +02:00
|
|
|
<?php
|
2016-08-30 16:31:56 +02:00
|
|
|
/**
|
|
|
|
* Unit Tests: Basic_Object cloass
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage UnitTests
|
|
|
|
* @since 4.7.0
|
|
|
|
*/
|
2016-08-19 17:44:37 +02:00
|
|
|
|
2017-12-10 00:08:24 +01:00
|
|
|
trigger_error( __FILE__ . ' is deprecated since version 5.0.0 with no alternative available.' );
|
|
|
|
|
2016-08-30 16:31:56 +02:00
|
|
|
/**
|
|
|
|
* Class used to test accessing methods and properties
|
|
|
|
*
|
|
|
|
* @since 4.0.0
|
|
|
|
*/
|
2016-08-19 17:44:37 +02:00
|
|
|
class Basic_Object {
|
|
|
|
private $foo = 'bar';
|
|
|
|
|
|
|
|
public function __get( $name ) {
|
|
|
|
return $this->$name;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function __set( $name, $value ) {
|
|
|
|
return $this->$name = $value;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function __isset( $name ) {
|
|
|
|
return isset( $this->$name );
|
|
|
|
}
|
|
|
|
|
|
|
|
public function __unset( $name ) {
|
|
|
|
unset( $this->$name );
|
|
|
|
}
|
|
|
|
|
|
|
|
public function __call( $name, $arguments ) {
|
|
|
|
return call_user_func_array( array( $this, $name ), $arguments );
|
|
|
|
}
|
|
|
|
|
2019-07-01 10:00:12 +02:00
|
|
|
// phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
|
2016-08-19 17:44:37 +02:00
|
|
|
private function callMe() {
|
|
|
|
return 'maybe';
|
|
|
|
}
|
|
|
|
}
|