|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* Google Adsense Ads for Laravel. |
|
5
|
|
|
* |
|
6
|
|
|
* Package for easily including Google Adsense Ad units |
|
7
|
|
|
* in Laravel and Lumen. |
|
8
|
|
|
* |
|
9
|
|
|
* @developer Crypto Technology srl <https://cryptotech.srl/> |
|
10
|
|
|
* |
|
11
|
|
|
* @copyright Copyright (c) 2019 Crypto Technology srl |
|
12
|
|
|
* @license MIT |
|
13
|
|
|
* |
|
14
|
|
|
* Copyright (c) 2016 Galen Han |
|
15
|
|
|
* Copyright (c) 2019 Crypto Technology srl |
|
16
|
|
|
* |
|
17
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of |
|
18
|
|
|
* this software and associated documentation files (the "Software"), to deal in |
|
19
|
|
|
* the Software without restriction, including without limitation the rights to |
|
20
|
|
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
|
21
|
|
|
* the Software, and to permit persons to whom the Software is furnished to do so, |
|
22
|
|
|
* subject to the following conditions: |
|
23
|
|
|
* |
|
24
|
|
|
* The above copyright notice and this permission notice shall be included in all |
|
25
|
|
|
* copies or substantial portions of the Software. |
|
26
|
|
|
* |
|
27
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
28
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
|
29
|
|
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
|
30
|
|
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
|
31
|
|
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
|
32
|
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
33
|
|
|
*/ |
|
34
|
|
|
|
|
35
|
|
|
declare(strict_types=1); |
|
36
|
|
|
|
|
37
|
|
|
namespace CryptoTech\Laravel\Adsense\Tests; |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* Class AdsenseTest. |
|
41
|
|
|
*/ |
|
42
|
|
|
class AdsenseTest extends TestCase |
|
43
|
|
|
{ |
|
44
|
|
|
public function testAdsense() |
|
45
|
|
|
{ |
|
46
|
|
|
$return = $this->app->view->make('adsense::javascript')->render(); |
|
47
|
|
|
$this->assertSame("<script async src=\"//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\"></script>\n<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>\n", $return); |
|
48
|
|
|
} |
|
49
|
|
|
} |
|
50
|
|
|
|