Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
solarium
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
solarium
Commits
4b1fb0b0
Unverified
Commit
4b1fb0b0
authored
Jan 02, 2018
by
Markus Kalkbrenner
Committed by
GitHub
Jan 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add integration tests for all HTTP adapters (#540)
parent
4a16523d
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
113 additions
and
2 deletions
+113
-2
tests/Integration/AbstractTechproductsTest.php
tests/Integration/AbstractTechproductsTest.php
+4
-2
tests/Integration/TechproductsAdapters/TechproductsCurlTest.php
...Integration/TechproductsAdapters/TechproductsCurlTest.php
+7
-0
tests/Integration/TechproductsAdapters/TechproductsGuzzle3Test.php
...egration/TechproductsAdapters/TechproductsGuzzle3Test.php
+21
-0
tests/Integration/TechproductsAdapters/TechproductsGuzzleTest.php
...tegration/TechproductsAdapters/TechproductsGuzzleTest.php
+21
-0
tests/Integration/TechproductsAdapters/TechproductsHttpTest.php
...Integration/TechproductsAdapters/TechproductsHttpTest.php
+16
-0
tests/Integration/TechproductsAdapters/TechproductsPeclHttpTest.php
...gration/TechproductsAdapters/TechproductsPeclHttpTest.php
+23
-0
tests/Integration/TechproductsAdapters/TechproductsZendHttpTest.php
...gration/TechproductsAdapters/TechproductsZendHttpTest.php
+21
-0
No files found.
tests/Integration/TechproductsTest.php
→
tests/Integration/
Abstract
TechproductsTest.php
View file @
4b1fb0b0
...
@@ -5,7 +5,7 @@ namespace Solarium\Tests\Integration;
...
@@ -5,7 +5,7 @@ namespace Solarium\Tests\Integration;
use
Solarium\Core\Client\ClientInterface
;
use
Solarium\Core\Client\ClientInterface
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
use
Solarium\QueryType\Select\Query\Query
as
SelectQuery
;
class
TechproductsTest
extends
\PHPUnit_Framework_TestCase
abstract
class
Abstract
TechproductsTest
extends
\PHPUnit_Framework_TestCase
{
{
/**
/**
...
@@ -23,7 +23,9 @@ class TechproductsTest extends \PHPUnit_Framework_TestCase
...
@@ -23,7 +23,9 @@ class TechproductsTest extends \PHPUnit_Framework_TestCase
'path'
=>
'/solr/'
,
'path'
=>
'/solr/'
,
'core'
=>
'techproducts'
,
'core'
=>
'techproducts'
,
]
]
]
],
// Curl is the default adapter.
//'adapter' => 'Solarium\Core\Client\Adapter\Curl',
];
];
$this
->
client
=
new
\Solarium\Client
(
$config
);
$this
->
client
=
new
\Solarium\Client
(
$config
);
...
...
tests/Integration/TechproductsAdapters/TechproductsCurlTest.php
0 → 100644
View file @
4b1fb0b0
<?php
namespace
Solarium\Tests\Integration\TechproductsAdapters
;
use
Solarium\Tests\Integration\AbstractTechproductsTest
;
class
TechproductsCurlTest
extends
AbstractTechproductsTest
{}
tests/Integration/TechproductsAdapters/TechproductsGuzzle3Test.php
0 → 100644
View file @
4b1fb0b0
<?php
namespace
Solarium\Tests\Integration\TechproductsAdapters
;
use
Solarium\Tests\Integration\AbstractTechproductsTest
;
class
TechproductsGuzzle3Test
extends
AbstractTechproductsTest
{
public
function
setUp
()
{
if
(
!
class_exists
(
'\\Guzzle\\Http\\Client'
))
{
$this
->
markTestSkipped
(
'Guzzle 3 not installed'
);
}
else
{
parent
::
setUp
();
$this
->
client
->
setAdapter
(
'Solarium\Core\Client\Adapter\Guzzle'
);
}
}
}
tests/Integration/TechproductsAdapters/TechproductsGuzzleTest.php
0 → 100644
View file @
4b1fb0b0
<?php
namespace
Solarium\Tests\Integration\TechproductsAdapters
;
use
Solarium\Tests\Integration\AbstractTechproductsTest
;
class
TechproductsGuzzleTest
extends
AbstractTechproductsTest
{
public
function
setUp
()
{
if
(
!
class_exists
(
'\\GuzzleHttp\\Client'
))
{
$this
->
markTestSkipped
(
'Guzzle 6 not installed'
);
}
else
{
parent
::
setUp
();
$this
->
client
->
setAdapter
(
'Solarium\Core\Client\Adapter\Guzzle3'
);
}
}
}
tests/Integration/TechproductsAdapters/TechproductsHttpTest.php
0 → 100644
View file @
4b1fb0b0
<?php
namespace
Solarium\Tests\Integration\TechproductsAdapters
;
use
Solarium\Tests\Integration\AbstractTechproductsTest
;
class
TechproductsHttpTest
extends
AbstractTechproductsTest
{
public
function
setUp
()
{
parent
::
setUp
();
$this
->
client
->
setAdapter
(
'Solarium\Core\Client\Adapter\Http'
);
}
}
tests/Integration/TechproductsAdapters/TechproductsPeclHttpTest.php
0 → 100644
View file @
4b1fb0b0
<?php
namespace
Solarium\Tests\Integration\TechproductsAdapters
;
use
Solarium\Tests\Integration\AbstractTechproductsTest
;
use
Solarium\Core\Client\Adapter\PeclHttp
;
class
TechproductsPeclHttpTestTest
extends
AbstractTechproductsTest
{
public
function
setUp
()
{
if
(
!
function_exists
(
'http_get'
))
{
$this
->
markTestSkipped
(
'Pecl_http not available, skipping PeclHttp adapter tests'
);
}
else
{
parent
::
setUp
();
$this
->
client
->
setAdapter
(
new
PeclHttp
(
array
(
'timeout'
=>
10
)));
}
}
}
tests/Integration/TechproductsAdapters/TechproductsZendHttpTest.php
0 → 100644
View file @
4b1fb0b0
<?php
namespace
Solarium\Tests\Integration\TechproductsAdapters
;
use
Solarium\Tests\Integration\AbstractTechproductsTest
;
class
TechproductsZendHttpTest
extends
AbstractTechproductsTest
{
public
function
setUp
()
{
if
(
!
class_exists
(
'Zend_Loader_Autoloader'
)
&&
!
(
@
include_once
'Zend/Loader/Autoloader.php'
))
{
$this
->
markTestSkipped
(
'ZF not in include_path, skipping ZendHttp adapter tests'
);
}
else
{
parent
::
setUp
();
$this
->
client
->
setAdapter
(
'Solarium\Core\Client\Adapter\ZendHttp'
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment