Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2622 from timber/2.x-update-tests-fix-indentation
2.x update tests fix indentation
- Loading branch information
Showing
44 changed files
with
4,876 additions
and
4,875 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<?php | ||
|
||
class Sport extends \Timber\Post | ||
{ | ||
public function channel() | ||
{ | ||
return 'ESPN'; | ||
} | ||
} | ||
class Sport extends \Timber\Post | ||
{ | ||
public function channel() | ||
{ | ||
return 'ESPN'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?php | ||
|
||
echo 'Panic! at the Disco'; | ||
echo ' from '; | ||
echo 2015 - 10; | ||
echo 'Panic! at the Disco'; | ||
echo ' from '; | ||
echo 2015 - 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
<?php | ||
|
||
class TimberBenchmark | ||
class TimberBenchmark | ||
{ | ||
public static function testLoader() | ||
{ | ||
public static function testLoader() | ||
{ | ||
$TimberLoader = new Timber\Loader(); | ||
for ($i = 0; $i < 5000; $i++) { | ||
$loader = $TimberLoader->get_loader(); | ||
} | ||
$TimberLoader = new Timber\Loader(); | ||
for ($i = 0; $i < 5000; $i++) { | ||
$loader = $TimberLoader->get_loader(); | ||
} | ||
} | ||
|
||
public static function testImageResize() | ||
{ | ||
$img = 'arch.jpg'; | ||
public static function testImageResize() | ||
{ | ||
$img = 'arch.jpg'; | ||
$upload_dir = wp_upload_dir(); | ||
$destination = $upload_dir['path'] . '/' . $img; | ||
if (!file_exists($destination)) { | ||
copy(__DIR__ . '/../assets/' . $img, $destination); | ||
} | ||
for ($i = 0; $i < 20; $i++) { | ||
$upload_dir = wp_upload_dir(); | ||
$destination = $upload_dir['path'] . '/' . $img; | ||
if (!file_exists($destination)) { | ||
copy(__DIR__ . '/../assets/' . $img, $destination); | ||
} | ||
for ($i = 0; $i < 20; $i++) { | ||
$upload_dir = wp_upload_dir(); | ||
$img = Timber\ImageHelper::resize($upload_dir['url'] . '/arch.jpg', 500, 200, 'default', true); | ||
} | ||
$img = Timber\ImageHelper::resize($upload_dir['url'] . '/arch.jpg', 500, 200, 'default', true); | ||
} | ||
} | ||
|
||
public static function run($function) | ||
{ | ||
$start_time = microtime(true); | ||
self::$function(); | ||
$end_time = microtime(true); | ||
echo $end_time - $start_time; | ||
} | ||
public static function run($function) | ||
{ | ||
$start_time = microtime(true); | ||
self::$function(); | ||
$end_time = microtime(true); | ||
echo $end_time - $start_time; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
<?php | ||
|
||
class TimberBenchmark | ||
class TimberBenchmark | ||
{ | ||
public static function testLoader() | ||
{ | ||
public static function testLoader() | ||
{ | ||
$TimberLoader = new Timber\Loader(); | ||
for ($i = 0; $i < 5000; $i++) { | ||
$loader = $TimberLoader->get_loader(); | ||
} | ||
$TimberLoader = new Timber\Loader(); | ||
for ($i = 0; $i < 5000; $i++) { | ||
$loader = $TimberLoader->get_loader(); | ||
} | ||
} | ||
|
||
public static function run($function) | ||
{ | ||
$start_time = microtime(true); | ||
self::$function(); | ||
$end_time = microtime(true); | ||
echo $end_time - $start_time; | ||
} | ||
public static function run($function) | ||
{ | ||
$start_time = microtime(true); | ||
self::$function(); | ||
$end_time = microtime(true); | ||
echo $end_time - $start_time; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<?php | ||
|
||
class CustomComment extends \Timber\Comment | ||
class CustomComment extends \Timber\Comment | ||
{ | ||
public function foo() | ||
{ | ||
public function foo() | ||
{ | ||
return 'bar'; | ||
} | ||
return 'bar'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<?php | ||
|
||
class TimberPostSubclass extends Timber\Post | ||
class TimberPostSubclass extends Timber\Post | ||
{ | ||
public function foo() | ||
{ | ||
public function foo() | ||
{ | ||
return 'bar'; | ||
} | ||
return 'bar'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<?php | ||
|
||
class TimberTermSubclass extends Timber\Term | ||
class TimberTermSubclass extends Timber\Term | ||
{ | ||
public function foo() | ||
{ | ||
public function foo() | ||
{ | ||
return 'bar'; | ||
} | ||
return 'bar'; | ||
} | ||
} |
Oops, something went wrong.